home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / for_birt.swf / scripts / __Packages / mx / transitions / easing / Back.as next >
Encoding:
Text File  |  2007-09-27  |  756 b   |  35 lines

  1. class mx.transitions.easing.Back
  2. {
  3.    function Back()
  4.    {
  5.    }
  6.    static function easeIn(t, b, c, d, s)
  7.    {
  8.       if(s == undefined)
  9.       {
  10.          s = 1.70158;
  11.       }
  12.       return c * (t /= d) * t * ((s + 1) * t - s) + b;
  13.    }
  14.    static function easeOut(t, b, c, d, s)
  15.    {
  16.       if(s == undefined)
  17.       {
  18.          s = 1.70158;
  19.       }
  20.       return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
  21.    }
  22.    static function easeInOut(t, b, c, d, s)
  23.    {
  24.       if(s == undefined)
  25.       {
  26.          s = 1.70158;
  27.       }
  28.       if((t /= d / 2) < 1)
  29.       {
  30.          return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
  31.       }
  32.       return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;
  33.    }
  34. }
  35.